﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace CJFirewall.Kernel
{
        public class ProcessToImageConvert : IValueConverter
        {

            public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
            {
               Process nowpro = value as Process;
               if (nowpro == null)
                    return @"/Icon/SearchUI.png";
                    return @"/Icon/" + nowpro.ProcessName + ".png";
            }

            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
            {
                return null;
            }
        }
        public class ProcessToMoreConvert : IValueConverter
        {
            public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
            {
                return "/Resources/Setting.jpg";
            }

            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
            {
                return null;
            }
        }
}
